package cnpm02.j2ee.group3.model;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

import org.hibernate.validator.NotNull;

@Entity
@Table(name = "EMAIL_TEMPLATE", uniqueConstraints = @UniqueConstraint(columnNames = {
		"Code", "LanguageCode" }))
@AttributeOverrides(value = { @AttributeOverride(name = "id", column = @Column(name = "EmailTemplateId")) })
public class EmailTemplate extends AbstractEntity {
	private static final long serialVersionUID = 1L;

	@NotNull
	@Column(name = "LanguageCode", nullable = false, length = 3)
	private String languageCode;
	
	@NotNull
	@Column(name = "Code", nullable = false, length = 3)
	private String code;
	
	@NotNull
	@Column(name = "Subject", nullable = false, length = 50)
	private String subject;
	
	@NotNull
	@Column(name = "Content", nullable = false, length = 255)
	private String content;

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getSubject() {
		return subject;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getContent() {
		return content;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getCode() {
		return code;
	}

	public void setLanguageCode(String languageCode) {
		this.languageCode = languageCode;
	}

	public String getLanguage() {
		return languageCode;
	}
}
